import javax.swing.*;
import java.awt.*;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Vector;

public class Application extends JFrame {

    private static Application instance;
    private final int width = 600;
    private final int height = 600;
    public int highScore;

    // Singleton method

    public static Application getInstance() {
        if (instance == null)
            instance = new Application();
        return instance;

    }

    private Application() {

        // Setup jframe

        this.setSize(new Dimension(width, height));
        this.setPreferredSize(new Dimension(width, height));
        this.setMinimumSize(new Dimension(width, height));
        this.setTitle("Another Brick In the Wall");
        this.setLayout(null);
        this.setBounds(0, 0, width, height);
        //this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        this.pack();
        this.setVisible(true);
        this.setResizable(true);

    }

    public static void main(String[] args) {
        // Start game on new thread

        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                // This will call LogicController constructor.
                // Briefly starts the game
                GameController.getInstance();

            }
        });

    }
}
